Skip to content

Improve actions/ql/src/Security/CWE-829/UntrustedCheckoutX queries further iteration#21852

Open
knewbury01 wants to merge 7 commits into
github:mainfrom
knewbury01:knewbury01/adjust-actions-queries-untrusted-checkout-second-iteration
Open

Improve actions/ql/src/Security/CWE-829/UntrustedCheckoutX queries further iteration#21852
knewbury01 wants to merge 7 commits into
github:mainfrom
knewbury01:knewbury01/adjust-actions-queries-untrusted-checkout-second-iteration

Conversation

@knewbury01
Copy link
Copy Markdown
Contributor

@knewbury01 knewbury01 commented May 14, 2026

changes:

  • reverted name change in previous PR - received feedback that newer version was less clear - but adjusted word "trusted" to privileged since it does check if the checkout occurs at privileged location
  • added more resources to all 3 helpfiles, and added 1 line in recommendations that mentions to check job level permissions
  • improves alert message for high and critical query

@github-actions github-actions Bot added documentation Actions Analysis of GitHub Actions labels May 14, 2026
Comment thread actions/ql/src/Security/CWE-829/UntrustedCheckoutCritical.ql Fixed
Comment thread actions/ql/src/Security/CWE-829/UntrustedCheckoutHigh.ql Fixed
@knewbury01 knewbury01 changed the title Adjust untrusted checkout actions queries Improve actions/ql/src/Security/CWE-829/UntrustedCheckoutX queries second iteration May 14, 2026
@knewbury01 knewbury01 changed the title Improve actions/ql/src/Security/CWE-829/UntrustedCheckoutX queries second iteration Improve actions/ql/src/Security/CWE-829/UntrustedCheckoutX queries further iteration May 14, 2026
@knewbury01 knewbury01 marked this pull request as ready for review May 20, 2026 15:20
@knewbury01 knewbury01 requested a review from a team as a code owner May 20, 2026 15:20
Copilot AI review requested due to automatic review settings May 20, 2026 15:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR iterates on the GitHub Actions CWE-829 “untrusted checkout” queries by refining user-facing metadata (query name / alert text), expanding helpfile guidance/resources, and updating accompanying change notes and query-test expectations.

Changes:

  • Updated actions/untrusted-checkout/high query metadata (@name) and revised alert messages for the high/critical variants.
  • Refined wording and added least-privilege guidance + an additional resource link in all three help files (medium/high/critical).
  • Added new change-note entries and updated query-test .expected outputs to reflect the new alert messages.
Show a summary per file
File Description
actions/ql/test/query-tests/Security/CWE-829/UntrustedCheckoutHigh.expected Updated expected results to match the revised alert message.
actions/ql/test/query-tests/Security/CWE-829/UntrustedCheckoutCritical.expected Updated expected results to match the revised alert message.
actions/ql/src/Security/CWE-829/UntrustedCheckoutMedium.md Help text tweaks + added least-privilege recommendation and an extra reference link.
actions/ql/src/Security/CWE-829/UntrustedCheckoutHigh.ql Updated query @name metadata and the alert message string.
actions/ql/src/Security/CWE-829/UntrustedCheckoutHigh.md Help text tweaks + added least-privilege recommendation and an extra reference link.
actions/ql/src/Security/CWE-829/UntrustedCheckoutCritical.ql Updated the alert message string.
actions/ql/src/Security/CWE-829/UntrustedCheckoutCritical.md Help text tweaks + added least-privilege recommendation and an extra reference link.
actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-metadata.md New change note documenting query metadata changes.
actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-helpfile.md New change note documenting helpfile wording/resource updates.
actions/ql/src/change-notes/2026-05-14-further-iteration-untrusted-checkout-improvements-alert.md New change note documenting alert message changes.

Copilot's findings

Comments suppressed due to low confidence (3)

actions/ql/src/Security/CWE-829/UntrustedCheckoutMedium.md:168

  • The resource bullet uses "least privileges"; this should be "least privilege" for correct terminology.
- Securing with least privileges: [Workflow secure use](https://docs.github.com/en/actions/reference/security/secure-use).

actions/ql/src/Security/CWE-829/UntrustedCheckoutHigh.md:168

  • The resource bullet uses "least privileges"; this should be "least privilege" for correct terminology.
- Securing with least privileges: [Workflow secure use](https://docs.github.com/en/actions/reference/security/secure-use).

actions/ql/src/Security/CWE-829/UntrustedCheckoutCritical.md:168

  • The resource bullet uses "least privileges"; this should be "least privilege" for correct terminology.
- Securing with least privileges: [Workflow secure use](https://docs.github.com/en/actions/reference/security/secure-use).
  • Files reviewed: 10/10 changed files
  • Comments generated: 7

@@ -1,5 +1,5 @@
/**
* @name Checkout of untrusted code in privileged context without privileged context use
* @name Checkout of untrusted code in privileged context

The artifacts downloaded from the first workflow should be considered untrusted and must be verified.

Additionally, ensure that least privileges are used both at the workflow level (through event triggers and workflow permissions) and job level (through job permissions).

The artifacts downloaded from the first workflow should be considered untrusted and must be verified.

Additionally, ensure that least privileges are used both at the workflow level (through event triggers and workflow permissions) and job level (through job permissions).

The artifacts downloaded from the first workflow should be considered untrusted and must be verified.

Additionally, ensure that least privileges are used both at the workflow level (through event triggers and workflow permissions) and job level (through job permissions).
---
category: queryMetadata
---
* Reversed adjustment of the name of `actions/untrusted-checkout/high`, but change the word "trusted" to "privileged". No newline at end of file
---
category: fix
---
* Adjusted (minor) help file descriptions for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`, `actions/untrusted-checkout/medium`. Clarified wording on in minor point, added one more listed resource and added one more recommendation for things to check. No newline at end of file
---
category: minorAnalysis
---
* Altered the alert message for clarity for queries: `actions/untrusted-checkout/critical`, `actions/untrusted-checkout/high`. No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Actions Analysis of GitHub Actions documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants